﻿<%@ Page Title="" Language="C#" MasterPageFile="~/DreamProject/MasterDownload.master"
    AutoEventWireup="true" CodeFile="DownloadMovies.aspx.cs" Inherits="DreamProject_Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <div id="left-column">
            <h3>
                Movie Category</h3>
            <ul class="nav">
                <li>
                    <asp:DataList ID="grdCategoryName" runat="server" RepeatDirection="Vertical" GridLines="None"
                        DataKeyField="SubCategoryID" OnItemCommand="grdCategoryName_ItemCommand">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkCategory" runat="server" CommandName="MovieCategory" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"SubCategoryID") %>'
                                Text='<%# DataBinder.Eval(Container.DataItem,"SubCategoryName") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:DataList>
                </li>
            </ul>
            <h3>
                Latest Movies</h3>
            <ul class="nav">
                <li>
                    <asp:DataList ID="grdMovies" runat="server" RepeatDirection="Vertical" GridLines="None"
                        DataKeyField="MovieID" OnItemCommand="grdMovies_ItemCommand">
                        <ItemTemplate>
                            <asp:ImageButton ID="imgMovie" Width="135px" Height="120px" CommandName="MovieCover"
                                CommandArgument='<%# DataBinder.Eval(Container.DataItem,"MovieID") %>' ImageUrl='<%# DataBinder.Eval(Container.DataItem,"MovieCoverPath") %>'
                                runat="server" />
                        </ItemTemplate>
                    </asp:DataList>
                </li>
            </ul>
            <%-- <h3>
                Movie Year</h3>
            <ul class="nav">
                <li>
                    <asp:DataList ID="DataList2" runat="server" RepeatDirection="Vertical" GridLines="None"
                        DataKeyField="SubCategoryID">
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkCategory" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"SubCategoryID") %>'
                                Text='<%# DataBinder.Eval(Container.DataItem,"SubCategoryName") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:DataList>
                </li>
            </ul>
            <a href="#" class="link">Link here</a> <a href="#" class="link">Link here</a>--%>
        </div>
        <asp:DataList ID="grdAllMovies" Width="80%" runat="server" RepeatDirection="Horizontal"
            RepeatColumns="2" GridLines="None" DataKeyField="MovieID" OnItemCommand="grdAllMovies_ItemCommand">
            <ItemTemplate>
                <table width="80%">
                    <tr>
                        <td align="center" valign="top">
                            <table border="0" cellpadding="0" cellspacing="0" width="350px">
                                <tr>
                                    <td colspan="4" style="height: 14px">
                                        <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" style="height: 14px">
                                    </td>
                                </tr>
                                <tr>
                                    <td width="13" style="height: 12px">
                                        <img name="table_r1_c1" src="images/table_r1_c1.gif" width="13" height="12" border="0"
                                            alt="">
                                    </td>
                                    <td width="339" background="images/table_r1_c2.gif" style="height: 12px">
                                        <img name="table_r1_c2" src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                    <td width="13" style="height: 12px">
                                        <img name="table_r1_c3" src="images/table_r1_c3.gif" width="13" height="12" border="0"
                                            alt="">
                                    </td>
                                    <td width="11" style="height: 12px">
                                        <img src="images/spacer.gif" width="1" height="12" border="0" alt="">
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/table_r2_c1.gif">
                                        <img name="table_r2_c1" src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                    <td align="center">
                                        <table cellpadding="5px">
                                            <tr>
                                                <td>
                                                    <asp:Label ID="lblMovieName" Font-Bold="true" Font-Size="X-Large" runat="server"
                                                        Text='<%# DataBinder.Eval(Container.DataItem,"MovieName") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:ImageButton ID="imgMovieCover" Width="300px" Height="400px" CommandName="Movie"
                                                        CommandArgument='<%# DataBinder.Eval(Container.DataItem,"MovieID") %>' ImageUrl='<%# DataBinder.Eval(Container.DataItem,"MovieCoverPath") %>'
                                                        runat="server" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td background="images/table_r2_c3.gif">
                                        <img name="table_r2_c3" src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                    <td>
                                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                </tr>
                                <tr>
                                    <td style="height: 16px">
                                        <img name="table_r3_c1" src="images/table_r3_c1.gif" width="13" height="16" border="0"
                                            alt="">
                                    </td>
                                    <td background="images/table_r3_c2.gif" style="height: 16px">
                                        <img name="table_r3_c2" src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                    <td style="height: 16px">
                                        <img name="table_r3_c3" src="images/table_r3_c3.gif" width="13" height="16" border="0"
                                            alt="">
                                    </td>
                                    <td style="height: 16px">
                                        <img src="images/spacer.gif" width="1" height="16" border="0" alt="">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
        <asp:DataList ID="grdMovie" Width="80%" runat="server" RepeatDirection="Horizontal"
            Visible="false" RepeatColumns="2" GridLines="None" DataKeyField="MovieID">
            <ItemTemplate>
                <table width="80%">
                    <tr>
                        <td align="center" valign="top">
                            <table border="0" cellpadding="0" cellspacing="0" width="60%">
                                <tr>
                                    <td colspan="4" style="height: 14px">
                                        <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" style="height: 14px">
                                    </td>
                                </tr>
                                <tr>
                                    <td width="13" style="height: 12px">
                                        <img name="table_r1_c1" src="images/table_r1_c1.gif" width="13" height="12" border="0"
                                            alt="">
                                    </td>
                                    <td width="339" background="images/table_r1_c2.gif" style="height: 12px">
                                        <img name="table_r1_c2" src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                    <td width="13" style="height: 12px">
                                        <img name="table_r1_c3" src="images/table_r1_c3.gif" width="13" height="12" border="0"
                                            alt="">
                                    </td>
                                    <td width="11" style="height: 12px">
                                        <img src="images/spacer.gif" width="1" height="12" border="0" alt="">
                                    </td>
                                </tr>
                                <tr>
                                    <td background="images/table_r2_c1.gif">
                                        <img name="table_r2_c1" src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                    <td align="center">
                                        <table cellpadding="5px" width="60%">
                                            <tr>
                                                <td>
                                                    <asp:Label ID="lblMovieName" Font-Bold="true" Font-Size="X-Large" runat="server"
                                                        Text='<%# DataBinder.Eval(Container.DataItem,"MovieName") %>'></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Image ID="imgMovieCover" Width="300px" Height="400px" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"MovieCoverPath") %>'
                                                        runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    '<%# DataBinder.Eval(Container.DataItem, "MovieDescription")%>'
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td background="images/table_r2_c3.gif">
                                        <img name="table_r2_c3" src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                    <td>
                                        <img src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                </tr>
                                <tr>
                                    <td style="height: 16px">
                                        <img name="table_r3_c1" src="images/table_r3_c1.gif" width="13" height="16" border="0"
                                            alt="">
                                    </td>
                                    <td background="images/table_r3_c2.gif" style="height: 16px">
                                        <img name="table_r3_c2" src="images/spacer.gif" width="1" height="1" border="0" alt="">
                                    </td>
                                    <td style="height: 16px">
                                        <img name="table_r3_c3" src="images/table_r3_c3.gif" width="13" height="16" border="0"
                                            alt="">
                                    </td>
                                    <td style="height: 16px">
                                        <img src="images/spacer.gif" width="1" height="16" border="0" alt="">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
        <br />
        <asp:DataList ID="grdScreen" Width="100%" runat="server" RepeatDirection="Vertical" Visible="false"
            GridLines="None" DataKeyField="ScreenID" >
            <HeaderTemplate>
                <table width="100%">
                    <tr>
                        <td align="center">
                            <img src="Images/screen.gif" />
                        </td>
                    </tr>
                </table>
            </HeaderTemplate>
            <ItemTemplate>
                <table cellpadding="3px" width="100%">
                    <tr>
                        <td align="center" valign="top">
                            <asp:Image ID="imgMovie" Width="400px" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"ScreenPath") %>'
                                runat="server" />
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
        
         <asp:DataList ID="grdDownloadLink" Width="100%" runat="server" RepeatDirection="Vertical" Visible="false"
            GridLines="None" DataKeyField="MovieLinkID">
            <HeaderTemplate>
                <table width="100%">
                    <tr>
                        <td align="center">
                           <img src="Images/DownloadLink.gif" />
                        </td>
                    </tr>
                </table>
            </HeaderTemplate>
            <ItemTemplate>
                <table cellpadding="3px" width="100%">
                    <tr>
                        <td align="center" valign="top">
                        <asp:LinkButton ID="imgbtnlLink" Width="400px" CommandName="DownloadLink"
                            CommandArgument='<%# DataBinder.Eval(Container.DataItem,"MovieLinkID") %>'
                             Text='<%# DataBinder.Eval(Container.DataItem,"PartNo") %>' PostBackUrl='<%# DataBinder.Eval(Container.DataItem,"LinkPath") %>'
                                runat="server"></asp:LinkButton>
                                
                         <%--   <asp:ImageButton ID="imgbtnlLink" Width="400px" CommandName="DownloadLink"
                            CommandArgument='<%# DataBinder.Eval(Container.DataItem,"MovieLinkID") %>'
                             ImageUrl='<%# DataBinder.Eval(Container.DataItem,"PartNo") %>' 
                                runat="server" />--%>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
    </div>
</asp:Content>
